<template>
  <h1>coutn:{{count}}</h1>
  <button @click="changeCount">修改</button>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "About",
});
</script>

<script setup lang="ts">
  import {ref , watch} from "vue"

  let count = ref(100)
  const changeCount = () => {
    count.value++
  }
  watch(count , (newval , oldval) => {
    console.log(newval , oldval);
  })
</script>